package com.fqgj.sentry.biz.decision.callback;

import com.fqgj.common.utils.CollectionUtils;
import com.fqgj.common.utils.JSONUtils;
import com.fqgj.common.utils.MD5;
import com.fqgj.log.factory.LogFactory;
import com.fqgj.log.interfaces.Log;
import com.fqgj.sentry.api.domain.request.DataCallback;
import com.fqgj.sentry.biz.store.OrderBase;
import com.fqgj.sentry.biz.store.system.SystemColumnUtil;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * Created by liupengpeng on 2017/11/3.
 */
public class DecisionDataCallbackThread implements Runnable {

    public static final Log LOGGER = LogFactory.getLog(DecisionDataCallbackThread.class);

    private List<DataCallback> dataCallbackList;
    private Long appId;
    private Long merchantId;

    public DecisionDataCallbackThread(List<DataCallback> dataCallbackList, Long appId, Long merchantId) {
        this.dataCallbackList = dataCallbackList;
        this.appId = appId;
        this.merchantId = merchantId;
    }

    @Override
    public void run() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        if (CollectionUtils.isNotEmpty(dataCallbackList)) {
            LOGGER.info("规则引擎数据回传  开始，size:{}", dataCallbackList.size());
            Integer size = dataCallbackList.size();
            LOGGER.info("hbase更新回传数据开始，appId:{},merchantId:{},size:{}", appId, merchantId, size);
            Integer num = 1;
            LOGGER.info("规则引擎数据回传  结束，size:{}", dataCallbackList.size());
        }
    }
}
